home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / oobpls10.zip / TGIF.PAS < prev   
Pascal/Delphi Source File  |  1992-11-06  |  1KB  |  59 lines

  1. program TGIF;  {example offline GIF decoder mainline}
  2.  
  3. {**************************************************************************}
  4. {*                    Part of OOBPLUS Distribution                        *}
  5. {**************************************************************************}
  6.  
  7. {The state of the following define must match the state of the same define
  8.  in GIFVIDEO.PAS}
  9.  
  10. {$DEFINE UseSVGA}
  11.  
  12. uses
  13.   DOS,
  14.   OpCrt,
  15.   OpString,
  16.   GIFVideo,
  17.   OfLGIF;
  18.  
  19. var
  20.   S : String;
  21.   P : Pointer;
  22.   X,L : Word;
  23.   OMode : Word;
  24.  
  25. begin
  26.     {get filename from command line}
  27.   if ParamCount = 0 then exit;
  28.   S := DefaultExtension(ParamStr(1),'GIF');
  29.  
  30.     {save the screen}
  31.   if not SaveWindow(1,1,ScreenWidth,ScreenHeight,True,P) then halt;
  32.   GetCursorState(X,L);
  33.   ClrScr;
  34.  
  35. {$IFDEF UseSVGA}
  36.     {if we're a VGA, find out if SVGA}
  37.   if CurrentDisplay = VGA then begin
  38.     OMode := CurrentMode;
  39.     DetectSVGAType(True);
  40.     TextMode(OMode);
  41.     Write('Video found: '+SVGANames[SVGAType]);
  42.     if SVGAType = vtVESA then with VesaVGAInfo do
  43.       Write(' (',VESASignature,' ',
  44.               Hi(VESAVersion),'.',Lo(VESAVersion),' ',
  45.               OEMStringPtr^,')');
  46.     WriteLn;
  47.     Delay(1000);
  48.   end;
  49. {$ENDIF}
  50.  
  51.     {do it}
  52.   if DisplayGIFOffline(S) then ;
  53.  
  54.     {restore things}
  55.   ClrScr;
  56.   RestoreWindow(1,1,ScreenWidth,ScreenHeight,True,P);
  57.   RestoreCursorState(X,L);
  58. end.
  59.